﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt.teradata
{
	// Token: 0x020000D5 RID: 213
	public class TTeradataExecute : TCustomSqlStatement
	{
		// Token: 0x0600077D RID: 1917 RVA: 0x00300C13 File Offset: 0x002FEE13
		public TTeradataExecute(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstteradataexecute;
		}

		// Token: 0x1700015D RID: 349
		// (get) Token: 0x0600077E RID: 1918 RVA: 0x00300C27 File Offset: 0x002FEE27
		// (set) Token: 0x0600077F RID: 1919 RVA: 0x00300C2F File Offset: 0x002FEE2F
		public virtual TObjectName MacroName
		{
			get
			{
				return this.macroName;
			}
			set
			{
				this.macroName = value;
			}
		}

		// Token: 0x1700015E RID: 350
		// (get) Token: 0x06000780 RID: 1920 RVA: 0x00300C38 File Offset: 0x002FEE38
		// (set) Token: 0x06000781 RID: 1921 RVA: 0x00300C40 File Offset: 0x002FEE40
		public virtual TExecParameterList Parameters
		{
			get
			{
				return this.parameters;
			}
			set
			{
				this.parameters = value;
			}
		}

		// Token: 0x06000782 RID: 1922 RVA: 0x00300C4C File Offset: 0x002FEE4C
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			TExecuteSqlNode texecuteSqlNode = (TExecuteSqlNode)this.rootNode;
			this.macroName = texecuteSqlNode.ModuleName;
			this.parameters = texecuteSqlNode.Parameters;
			if (this.parameters != null)
			{
				for (int i = 0; i < this.parameters.size(); i++)
				{
					this.parameters.getExecParameter(i).doParse(this, ESqlClause.unknown);
				}
			}
			return 0;
		}

		// Token: 0x06000783 RID: 1923 RVA: 0x00300CC1 File Offset: 0x002FEEC1
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000784 RID: 1924 RVA: 0x00300CD1 File Offset: 0x002FEED1
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x040011E3 RID: 4579
		private TObjectName macroName;

		// Token: 0x040011E4 RID: 4580
		private TExecParameterList parameters;
	}
}
